package pers.lt.hibernatebeans;

import javax.persistence.*;

/**
 * Created by gjj on 2018/1/16.
 */
@Entity(name = "DFFCODEINFO")
public class DffcodeInfoEntity {
    private String id;
    private String dffcodeCode;
    private String dffcodeIns;
    private String dffcodeName;
    private String pid;

    @Id
    @Column(name = "ID", nullable = false, length = 255)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "DFFCODE_CODE", nullable = true, length = 255)
    public String getDffcodeCode() {
        return dffcodeCode;
    }

    public void setDffcodeCode(String dffcodeCode) {
        this.dffcodeCode = dffcodeCode;
    }

    @Basic
    @Column(name = "DFFCODE_INS", nullable = true, length = 255)
    public String getDffcodeIns() {
        return dffcodeIns;
    }

    public void setDffcodeIns(String dffcodeIns) {
        this.dffcodeIns = dffcodeIns;
    }

    @Basic
    @Column(name = "DFFCODE_NAME", nullable = true, length = 255)
    public String getDffcodeName() {
        return dffcodeName;
    }

    public void setDffcodeName(String dffcodeName) {
        this.dffcodeName = dffcodeName;
    }

    @Basic
    @Column(name = "PID", nullable = true, length = 255)
    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DffcodeInfoEntity that = (DffcodeInfoEntity) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (dffcodeCode != null ? !dffcodeCode.equals(that.dffcodeCode) : that.dffcodeCode != null) return false;
        if (dffcodeIns != null ? !dffcodeIns.equals(that.dffcodeIns) : that.dffcodeIns != null) return false;
        if (dffcodeName != null ? !dffcodeName.equals(that.dffcodeName) : that.dffcodeName != null) return false;
        if (pid != null ? !pid.equals(that.pid) : that.pid != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (dffcodeCode != null ? dffcodeCode.hashCode() : 0);
        result = 31 * result + (dffcodeIns != null ? dffcodeIns.hashCode() : 0);
        result = 31 * result + (dffcodeName != null ? dffcodeName.hashCode() : 0);
        result = 31 * result + (pid != null ? pid.hashCode() : 0);
        return result;
    }
}
